package de.koller.pulsar.scene.star;

import de.koller.oceanFramework.math.RVec2;

public class StarPhysics {

	public float velocity = 0;
	public final RVec2 rotationCenter = new RVec2();
	
	public void stepStar( FuzzyStar star ) {
		RVec2 v = star.position.newInstace();
		v.sub( rotationCenter );
		
		float rd = (2f * (float)Math.PI) / 
				( (2f * (float)Math.PI * v.getLength()) / velocity );

		v.setDirection( v.getDirection() + rd );
		star.position.set( v.add( rotationCenter ) );
	}
	
}
